Script: -- Example by Alan Pabst, Heizer Software¬--on windowEvent --wdID,wdName,objNo,objName,objValue¬if objValue="Open" then ¬ wsSet wdID,"userEnter","Text", ""¬ wsSet wdID,"path","Text", ""¬ wsSet wdID,"8","Value", "0"¬ ¬ --else if objValue="Close" then ¬ ¬ --else if objValue="Suspend" then ¬ ¬ --else if objValue="Resume" then ¬ ¬ --else if objValue="CloseBox" then ¬ ¬ --else if objValue="ZoomBox" then ¬ ¬ --else if objValue="GrowBox" then ¬ ¬ --else if objValue="TitleBar" then ¬ ¬end if¬¬--end windowEvent¬¬
ItemType: PUSH
Rect: 269,113,341,133
Name: Find
DefaultItem: TRUE
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put empty into searchFor¬put empty into buildList¬wsSet wdID,"path","Text", ""¬wsSet wdID,"Cancel","Disabled", "true"¬get wsGet(wdID,"userEnter","Text")¬put it into searchFor¬put the number of cards in this stack into x¬wsSet wdID,"completed","Max", x¬lock screen¬if x > 1 then¬ put the number of this card into returnPoint¬ go to the first card of this stack¬end if¬wsSet wdID,"8","Value", "1"¬find searchFor¬if the result is not empty then¬ put "No occurrences found..." into buildList¬else¬ put the id of this card into LoopCheck¬ put the foundText&":"&&the short name of this cd&return after buildList ¬ go next cd¬ put the number of this cd into i¬ wsSet wdID,"8","Value", i ¬ put empty into currID¬ repeat until currID = LoopCheck¬ find searchFor ¬ put the id of this card into currID¬ if currID = LoopCheck then ¬ exit repeat¬ wsSet wdID,"8","Value", x¬ end if ¬ put the foundText&":"&&the short name of this cd&return after buildList¬ put the number of this cd into i¬ wsSet wdID,"8","Value", i ¬ go next cd¬ end repeat¬end if¬wsSet wdID,"8","Value", x¬wsSet wdID,"Cancel","Disabled", "false"¬wsSet wdID,"path","Text", buildList¬if x > 1 then go to card returnPoint¬wsSet wdID,"8","Value","0"¬unlock screen¬¬--end mouseUp¬
Script: --on mouseUp wdID,wdName,objNo,objName,objValue¬put the name of this card into imHere¬get wsGet(wdID,"path","selectionText")¬if it = empty then ¬ ¬else if it = "no occurrences found..." then¬ beep¬else¬ delete word 1 of it¬ put it into goTo¬ if goTo ≠ imHere then¬ if word 1 of goTo = "card" then ¬ go to goTo¬ else¬ go to card goTo¬ end if¬ end if¬end if¬--end mouseUp¬¬¬